﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Security;

namespace Tool
{
	public partial class Main : Form
	{
		public Main()
		{
			InitializeComponent();
		}

		private void btnGetCode_Click(object sender, EventArgs e)
		{
			try
			{
				txtCode.Text = EncryptClass.GetCode();
				if (txtCode.Text.Length > 0)
				{
					Clipboard.SetText(txtCode.Text);
					lbTip.Text = "获取密钥成功并已复制到剪贴板";
				}
			}
			catch (Exception ex)
			{

				MessageBox.Show(ex.Message);
			}
		}

		private void btnClose_Click(object sender, EventArgs e)
		{
			this.Close();
		}
	}
}
